<!DOCTYPE html>
<html lang="zh">
<head>
    <title>付费知识管理</title>
    <{include file="article/public/header"}>
    <link rel="stylesheet" href="/static/adminlte/plugins/jsTree/style.min.css">
    <style>

        .jstree-default .jstree-anchor{
            height: 40px;
        }


    </style>

</head>
<body class="hold-transition sidebar-mini layout-fixed">
<!-- Site wrapper -->
<div class="wrapper">
    <!-- Navbar -->
    <{include file="article/public/navbar"}>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <!--左侧菜单-->
    <{include file="article/public/sidebar"}>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">

                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">设置中心</a></li>
                            <li class="breadcrumb-item active">应用链接</li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="card">
                    <div class="card-header">
                        <div class="form-group">


                        </div>
                    </div>
                    <div class="card-body">
                        <div class="wrapper wrapper-content animated fadeInRight">
                            <div class="card-body">
                                <table id="my_table" class="table table-bordered table-striped">
                                    <thead>
                                    <tr>
                                        <th>名称</th>
                                        <th>url</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <{if !empty($data)}>
                                    <{foreach $data as $item}>
                                    <tr>
                                        <td><{$item.name}></td>
                                        <td><{$item.url}></td>
                                    </tr>
                                    <{/foreach}>
                                    <{/if}>



                                    </tbody>
                                    <tfoot>


                                    </tfoot>
                                </table>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

        </section>
    </div>


</div>
<!-- ./wrapper -->

<{include file="article/public/footer"}>
<script src="/static/adminlte/plugins/jsTree/jstree.min.js"></script>
<script>


</script>
<script>
    $(function () {
        $('#jstree').jstree();
        $(".add-data").click(function () {
            openPage("<{:url('category_form')}>",'新增分类','90%','500px')
        });
        $(".edit-data").on('click',function () {
            var id = $(this).data('id');
            openPage("<{:url('category_form')}>?id="+id,'编辑分类','90%','500px')
        })
    });
    function del(id,obj){
        layer.confirm('确定要删除吗',{title:'删除确认',btn:['确定','点错了']},function (index) {
            sendData("<{:url('category_action')}>",{id:id,ac:'del'},function (res) {
                if (res.code==0){
                    $(obj).parent('a').parent('li').remove()
                    layer.close(index)
                }
            })

        })
    }


</script>
</body>
</html>
